﻿using PlaceOrder_Shared.Models.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlaceOrder_Shared.Models.Daily
{
    public class LilyTradeModel
    {
        public LilyTradeModel()
        { }

        public LilyTradeModel(UserTrade trade)
        {
            deliverySpeed = trade.DeliverySpeed;
            deliveryTime = trade.DeliveryDate.ToString("yyyy-MM-dd ") + "00:00:00";
            deliveryTime2 = deliveryTime;
            if (trade.DealType == "bid" | trade.DealType == "taken")
            {
                direction = "bond_0";
            }
            else
            {
                direction = "bond_1";
            }
            price = trade.Price;
            remark = "";
            //当前环境下交易员固定为王成浩
            tradeuserId = 18;
            tscode = trade.TsCode;
            restVolume= trade.Volume.ToString();
            volume = trade.Volume.ToString();
            worstPrice = 0M;
            userTradeId = trade.UserTradeID.ToString();
            gaijiaTradeId =new List<Int64>() { trade.UserTradeID };

            brokerId = trade.BrokerID;

            realTradeIdList = trade.RealTradeIdList;


        }

        public int? brokerId { get; set; }

        public string deliverySpeed { get; set; }
        public string deliveryTime { get; set; }
        public string deliveryTime2 { get; set; }
        public string direction { get; set; }
        public decimal price { get; set; }
        public string remark { get; set; }
        public int tradeuserId { get; set; }
        public int status { get; set; }
        public string tscode { get; set; }
        public string volume { get; set; }
        public decimal worstPrice { get; set; }
        public string userTradeId { get; set; }
        public string restVolume { get; set; }

        public List<Int64> gaijiaTradeId { get; set; }

        public int[] realTradeIdList { get; set; }
    }
}
